package com.nanjia.boot.delivery.model.form;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 发票管理表单对象
 *
 * @author 周洋
 * @since 2025-06-13 10:55
 */
@Getter
@Setter
@Schema(description = "发票管理表单对象")
@JsonIgnoreProperties(ignoreUnknown = true)
public class InvoiceForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "TypeCode不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoiceTypeCode;

    private String invoiceCode;

    @NotBlank(message = "CompanyName不能为空")
    @Size(max=100, message="长度不能超过100个字符")
    private String invoiceCompanyName;

    @NotBlank(message = "TaxNumbe不能为空")
    @Size(max=100, message="长度不能超过100个字符")
    private String invoiceTaxNumber;

    @NotBlank(message = "DeliveryAddress不能为空")
    @Size(max=100, message="长度不能超过100个字符")
    private String invoiceDeliveryAddress;

    @Size(max=30, message="长度不能超过30个字符")
    private String postalCode;

    @NotBlank(message = "Nation不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoiceNation;

    @NotBlank(message = "Province不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoiceProvince;

    @NotBlank(message = "City不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoiceCity;

    @NotBlank(message = "Area不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoiceArea;

    @NotBlank(message = "Detail不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoiceDetail;

    @Schema(description = "是否是默认地址，0：非，1：是")
    @NotNull(message = "是否是默认地址不能为空")
    private Integer invoiceDefault;

    @NotBlank(message = "Phone不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String invoicePhone;

    @NotBlank(message = "Bank不能为空")
    @Size(max=200, message="长度不能超过200个字符")
    private String invoiceBank;

    @NotBlank(message = "BankNumber不能为空")
    @Size(max=100, message="长度不能超过100个字符")
    private String invoiceBankNumber;

//    @NotBlank(message = "不能为空")
//    @Size(max=30, message="长度不能超过30个字符")
//    private String subdomainCode;
//
//    @Size(max=30, message="长度不能超过30个字符")
//    private String subdomainUserCode;

    @Schema(description = "0：停止，1：正常：2：待审核，-1：已删除")
    @NotNull(message = "状态不能为空")
    private Integer invoiceStatus;


}
